using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;

namespace LS.Editor
{
    [CreateAssetMenu(menuName = "Lancer Studio/Framework Config",order =50)]
    internal class LSCodeTemplate : ScriptableObject
    {
        public TextAsset ConfigTemplate;
        public TextAsset DataTableTemplate;
        public TextAsset DictionaryTemplate;
        public TextAsset VisualScripingEventUnitTemplate;
        
        private static LSCodeTemplate m_Instance;
        public static LSCodeTemplate Instance
        {
            get
            {
                if (m_Instance == null)
                {
                    string guid = AssetDatabase.FindAssets("t:LSCodeTemplate").Single();
                    string path = AssetDatabase.GUIDToAssetPath(guid);
                    m_Instance = AssetDatabase.LoadAssetAtPath<LSCodeTemplate>(path);
                }
                return m_Instance;
            }
        }
    }
}
